export default function Authbutton(permission) {

    // 获取当前用户的权限列表
    var permissions = localStorage.getItem('userinfo') ?
        JSON.parse(localStorage.getItem('userinfo')).role.permissions : [];

    // 判断当前用户是否有权限访问该组件
    var res = permission && permissions.includes(permission);

    return res;
}